<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for循环</title>
    <script type="text/javascript">
        var result=0;
        for (var i=1;i<=100;i++){
            result+=i;
        }
        console.log("输出结果为："+result+"。")
        var intForArray=[1,3,5,7,9];
        for (var index in intForArray){
            //变量表示容器里元素的索引
            console.log(index, typeof index,intForArray[index-0])
        }
    </script>
</head>
<body>

</body>
</html>